<template>
  <div class="reportlisten">
    <v-header :back-display="true" :path="path">
      <div slot="title">练习报告</div>
    </v-header>

    <v-report :brush="brush" :analysis="analysis" :accuracy="accuracy" :total="total" :number="number">
      <div slot="keep" @click="keep">继续刷题</div>
      <div slot="all" @click="all">全部解析</div>
    </v-report>

  </div>
</template>

<script>
import header from '@/components/main/header'
import report from '@/components/content/report'
import api from '@/api/hear'

export default {
  name: 'reportlisten',
  components: {
    "v-header":header,
    "v-report":report,
  },
  data () {
    return {
      path:'home',
      brush:'/home/listentype',
      analysis:'/home/hearfill',
      accuracy:'',
      total:'',
      number:'',
    }
  },
  created () {
    this.getReport()
  },
  computed: {

  },
  methods: {
    getReport(){
      api.Hearreport().then(res=>{
        // console.log(res.data)
        this.accuracy = res.data.accuracy
        this.total = res.data.total
        this.number = res.data.number
      }).catch(error=>{
        console.log(error)
      })
    },
    // 继续刷题
    keep(){
      this.$store.dispatch("clearBlanks")
    },

    // 全部解析
    all(){
      this.$store.dispatch("showAnswer", true)
    }
  },
  mounted () {
  }
}
</script>

<style lang="less" scoped>
</style>
